﻿using Abp.Application.Services;
using App.Authorization.Roles.Dto;
using App.BaseObject;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace App.Authorization.Roles
{
    public interface IRoleAppService : IApplicationService
    {
        /// <summary>
        /// 获取所有角色
        /// </summary>
        /// <returns></returns>
        Task<List<Role>> GetAllRole();
        /// <summary>
        /// 根据角色名称获取指定角色
        /// </summary>
        /// <param name="roleName"></param>
        /// <returns></returns>
        Task<Role> GetRoleByNameAsync(string roleName);
        /// <summary>
        /// 保存角色所对应的按钮
        /// </summary>
        /// <param name="id"></param>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task SaveRoleButtons(int id, BulkKeyDto<int> dto);

        /// <summary>
        /// 保存角色
        /// </summary>
        /// <param name="bulks"></param>
        /// <returns></returns>
        Task SaveRoles(BulkDto<RoleDto> bulks);
    }
}
